//
//  GetYongJin.m
//  PlayBall
//
//  Created by yanfa on 16/4/23.
//
//

#import "GetYongJin.h"
#import "JddParameterBuilder.h"
#import "SBJson.h"

@implementation GetYongJin
@synthesize userid;

-(void)main{
    JddNetDataCommunication *netDataCommunication = [[JddNetDataCommunication alloc] init];
    
    NSMutableDictionary *dictionaryRegister = [NSMutableDictionary dictionaryWithCapacity:2];
    [dictionaryRegister setObject:userid forKey:@"userid"];
    SBJsonWriter *jsonWriter = [[SBJsonWriter alloc] init];
    NSString *parameterValue = [jsonWriter stringWithObject:dictionaryRegister];
    NSString *bodyString = [JddParameterBuilder buildParameterWithParameterJson:parameterValue actionCode:@"119"];
    NSData *dataRegister = [netDataCommunication requestDataByPostBodyData:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];
    [((NSObject*)self.delegate) performSelectorOnMainThread:@selector(GetYongJinResult:) withObject:dataRegister waitUntilDone:NO];
}
@end
